﻿@model Sistema_de_Gestión_de_Correspondencia.Models.Correo

@{
    ViewBag.Title = "Crear";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Content/tinymce/jscripts/tiny_mce/tiny_mce.js")" type="text/javascript"></script>
<script type="text/javascript">
    tinyMCE.init({
        mode: "textareas",
        theme: "advanced",
        plugins: "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager",
        theme_advanced_buttons1: "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
        theme_advanced_toolbar_location: "top",
        theme_advanced_toolbar_align: "left",
        theme_advanced_statusbar_location: "bottom",
        theme_advanced_resizing: false,
        template_external_list_url: "js/template_list.js",
        external_link_list_url: "js/link_list.js",
        external_image_list_url: "js/image_list.js",
        media_external_list_url: "js/media_list.js"
    });
</script>

<form id="correo" method="post" enctype="multipart/form-data" action="">

<div style="width:100%; float:left">
    <h3 style="float:left">Crear Correo</h3>
    <div style="float:right"><input type="submit" value="Crear" /> | @Html.ActionLink("Volver", "Index")
</div>
</div>

<fieldset style="float:left;"><legend></legend>

        <div>
            @Html.ValidationMessage("remitido")
        </div>

        <div style="width:100%; float:left;">
        		<label style="width:7%; float:left;">De: </label>
        		@Html.TextBoxFor(model => model.remitente, new { style = "width: 92%; float: right;" })
        </div>

        <div style="width:100%; float:left;">
        		<label style="width:7%; float:left;">Para: </label>
        		@Html.TextBoxFor(model => model.remitido, new { style = "width: 92%; float: right;" })
        </div>

        <div style="width:100%; float:left;">
        	<div style="width:50%; float:left;">
        		<label style="width:14%; float:left;">CC: </label>
            @Html.TextBoxFor(model => model.cc, new { style = "width: 85%; float: right;" })
            </div>
            <div style="width:50%; float:right;">
        		<label style="width:14%; float:left;">BCC: </label>
            @Html.TextBoxFor(model => model.bcc, new { style = "width: 85%; float: right;" })
            </div>
        </div>
        
      <div style="width:100%; float:left;">
        	<label style="width:7%; float:left;">Asunto: </label>
        	@Html.TextBoxFor(model => model.asunto, new { style = "width: 92%;" })
        </div>
        
        
            <hr />                 
      @Html.TextAreaFor(model => model.cuerpo, new { id = "RichTextBox", style = "height: 250px; width: 99%; " })
      
      <div style="width:100%; float:left;">
      
            <div style="width:50%; float:left;">
                Tipo: 
                @Html.DropDownList("idTipoCorreo", "--Seleccionar uno--")
                @Html.ValidationMessage("idTipoCorreo")
            </div>
            <div style="width:50%; float:right;">
        		Medio: 
                @Html.DropDownList("medio", "--Seleccionar uno--")
            @Html.ValidationMessage("medio")
            </div>
        </div>
        <hr />

        <div style="width:100%; float:left;">
           <label style="float:left">Documentos: </label>
           <div style="float:left">
                @FileUpload.GetHtml(null, 1, true, true, "Agregar", "Crear")
           </div>
        </div>
    </fieldset>
    </form>